/***********************************************************************
 * record object functions
 */
function Record(initValue) {
	/* init record object */
	this.recObj = new Object();
	if( arguments.length == 1 ){
		this.recObj = initValue;
	}
  }


Record.prototype.putItem = function(item, value) {
	/* put items into the record object */
//		debug("Record putItem (" + [item, value].join(', ') + ") ");
	this.recObj[item] = value;
}

Record.prototype.get = function() {
	/* get the record object */
	return this.recObj;
}

Record.prototype.getItem = function(item) {
	/* get an item from the record object */
//		debug("Record get (" + [item].join(', ') + ") ");
	return this.recObj[item];
}
	
Record.prototype.len = function() {
	/* len - number of elements in the record */
	var len = 0;
	for( j in this.recObj ){
		len++;
	}
	return len;
};

Record.prototype.toString = function() {
	/* toString - returns the record stringified */
	var recStr = "";
	for( j in this.recObj ){
		recStr += j + ': ' + this.recObj[j] + ', ';
	}
	return recStr.replace(/, $/,"");
};
